package com.hj.authority.domain.convert;


import com.hj.authority.domain.dto.SysUserDTO;
import com.hj.authority.domain.entity.SysUser;
import com.hj.authority.domain.vo.SysUserVO;
import com.hj.security.user.HjUserDetails;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author hj
 * @Date 2023/4/27
 * @Description: 动态编译.vo与entity互转
 */
@Mapper
public interface SysUserConvert {

    SysUserConvert INSTANCE = Mappers.getMapper(SysUserConvert.class);

    SysUserVO entityToVo(SysUser entity);

    SysUser voToEntity(SysUserVO vo);

    SysUser dtoToEntity(SysUserDTO dto);

    HjUserDetails convertDetail(SysUser entity);

    List<SysUserVO> convertList(List<SysUser> list);



}
